﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

public partial class ComRegiste : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        string path = this.FU.FileName;
        string[] file = path.Split('\\');
        string filename = file[file.Length - 1];
        if (filename != "")
        {
            string path1 = Server.MapPath("");
            string ok = path1 + "\\images\\comlogo\\" + filename;
            FU.SaveAs(ok);
            this.Image1.ImageUrl = "~/images/comlogo/" + filename;
            this.txtcomlogo.Text = filename;
        }
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        txtcompwd.Text = MD5.EncodeMD5(txtcompwd.Text.Trim());
       int i=comre.Insert();
       if (i > 0)
       {
           Response.Write("<script>alert('注册成功，E-mail将作为你的登录用户名！');</script>");
           Response.Write("<script>window.location.href='ComDefault.aspx';</script>");
       }
       
    }
    protected void txtcomname_TextChanged(object sender, EventArgs e)
    {

    }
}
